package com.itheima.project.vo.file;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.itheima.project.basic.BasicVo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.FieldNameConstants;

/**
 * @Description：附件表
 */
@Data
@NoArgsConstructor
@FieldNameConstants
public class FileVo extends BasicVo {

    private static final long serialVersionUID = 1L;

    public FileVo(Long id, Long businessId) {
        super(id);
        this.businessId = businessId;
    }

    @Builder
    public FileVo(Long id, Long businessId, String businessType,
                  String suffix, String fileName, String pathUrl,String storeFlag,String bucketName,String[] checkedIds,Long enterpriseId){
        super(id);
        this.businessId=businessId;
        this.businessType=businessType;
        this.suffix=suffix;
        this.fileName=fileName;
        this.pathUrl=pathUrl;
        this.storeFlag=storeFlag;
        this.bucketName=bucketName;
        this.url=pathUrl;
        this.checkedIds = checkedIds;
        this.enterpriseId=enterpriseId;
    }

    @ApiModelProperty(value = "业务ID")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long businessId;

    @ApiModelProperty(value = "业务类型")
    private String businessType;

    @ApiModelProperty(value = "后缀名")
    private String suffix;

    @ApiModelProperty(value = "文件名")
    private String fileName;

    @ApiModelProperty(value = "访问路径")
    private String pathUrl;

    @ApiModelProperty(value = "存储源标识，参考FileConstant")
    private String storeFlag;

    @ApiModelProperty(value = "存储空间名称")
    private String bucketName;

    @ApiModelProperty(value = "访问路径")
    private String url;

    @ApiModelProperty(value = "选中节点")
    private String[] checkedIds;

    @ApiModelProperty(value = "base64图片")
    private String base64Image;

    @ApiModelProperty(value = "商户ID【系统内部识别使用】")
    private Long enterpriseId;

}
